Image-processing apparatus, image-processing method, and computer program product

ABSTRACT

According to the present disclosure, an image-processing apparatus identifies for each gradation value a connected component of pixels of not less than or not more than the gradation value neighboring and connected to each other in an input image, thereby generating hierarchical structure data of a hierarchical structure including the connected component, extracts based on the hierarchical structure data a connected component satisfying character likelihood as a character-like region, acquires a threshold value of binarization used exclusively for the character-like region, acquires a corrected region where the character-like region is binarized, acquires a background where a gradation value of a pixel included in a region of the input image other than the corrected region is changed to a gradation value for a background, and acquires a binary image data of a binary image composed of the corrected region and the background region.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority fromJapanese Patent Application No. 2016-157937, filed on Aug. 10, 2016, theentire contents of which are incorporated herein by reference.

BACKGROUND OF THE DISCLOSURE 1. Field of the Disclosure

The present disclosure relates to an image-processing apparatus, animage-processing method, and a computer program product.

2. Description of the Related Art

Techniques of extracting character strings in images have beendisclosed.

JP-A-2015-26290 discloses a technique of segmenting the concentrationvalues with respect to each predetermined range, generating a componenttree of connected components extracted from the image within each of theranges, and performing text extraction based on a connection relation inthe component tree.

However, a conventional character-recognizing apparatus disclosed inJP-A-2015-26290 has a problem that there is a necessity of carrying outoptical character recognition (OCR) processing with respect to theconnected components and confirming likelihood of candidate charactersfor extracting a character string.

SUMMARY OF THE DISCLOSURE

It is an object of the present disclosure to at least partially solvethe problems in the conventional technology.

An image-processing apparatus according to one aspect of the presentdisclosure is an image-processing apparatus including a hierarchicalstructure generating unit that identifies for each gradation value aconnected component of pixels of not less than or not more than thegradation value neighboring and connected to each other in an inputimage and generates hierarchical structure data of a hierarchicalstructure including the connected component, a region extracting unitthat determines based on the hierarchical structure data whether theconnected component satisfies a feature of character likelihood andextracts the connected component satisfying the feature of characterlikelihood as a character-like region, a correcting unit that acquiresbased on a maximum gradation value and a minimum gradation value ofpixels included in the character-like region a threshold of binarizationused exclusively for the character-like region and acquires based on thethreshold of binarization a corrected region where the character-likeregion is binarized, and an image acquiring unit that acquires abackground region where a gradation value of a pixel included in aregion of the input image other than the corrected region is changed toa gradation value for a background and acquires binary image data of abinary image composed of the corrected region and the background region.

An image-processing method according to another aspect of the presentdisclosure is an image-processing method including a hierarchicalstructure generating step of identifying for each gradation value aconnected component of pixels of not less than or not more than thegradation value neighboring and connected to each other in an inputimage and generating hierarchical structure data of a hierarchicalstructure including the connected component, a region extracting step ofdetermining based on the hierarchical structure data whether theconnected component satisfies a feature of character likelihood andextracting the connected component satisfying the feature of characterlikelihood as a character-like region, a correcting step of acquiringbased on a maximum gradation value and a minimum gradation value ofpixels included in the character-like region a threshold of binarizationused exclusively for the character-like region and acquiring based onthe threshold of binarization a corrected region where thecharacter-like region is binarized, and an image acquiring step ofacquiring a background region where a gradation value of a pixelincluded in a region of the input image other than the corrected regionis changed to a gradation value for a background and acquiring binaryimage data of a binary image composed of the corrected region and thebackground region.

A computer program product according to still another aspect of thepresent disclosure is a computer program product having a non-transitorytangible computer readable medium including programmed instructions forcausing, when executed by a computer, the computer to perform animage-processing method including a hierarchical structure generatingstep of identifying for each gradation value a connected component ofpixels of not less than or not more than the gradation value neighboringand connected to each other in an input image and generatinghierarchical structure data of a hierarchical structure including theconnected component, a region extracting step of determining based onthe hierarchical structure data whether the connected componentsatisfies a feature of character likelihood and extracting the connectedcomponent satisfying the feature of character likelihood as acharacter-like region, a correcting step of acquiring based on a maximumgradation value and a minimum gradation value of pixels included in thecharacter-like region a threshold of binarization used exclusively forthe character-like region and acquiring based on the threshold ofbinarization a corrected region where the character-like region isbinarized, and an image acquiring step of acquiring a background regionwhere a gradation value of a pixel included in a region of the inputimage other than the corrected region is changed to a gradation valuefor a background and acquiring binary image data of a binary imagecomposed of the corrected region and the background region.

The above and other objects, features, advantages and technical andindustrial significance of this disclosure will be better understood byreading the following detailed description of presently preferredembodiments of the disclosure, when considered in connection with theaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example of a configuration of animage-processing apparatus according to one embodiment;

FIG. 2 is a flowchart of an example of processing in theimage-processing apparatus according to the embodiment;

FIG. 3 is a diagram of an example of an input image according to theembodiment;

FIG. 4 is a diagram of an example of a hierarchical structure ofconnected components according to the embodiment;

FIG. 5 is a diagram of an example of a connected component according tothe embodiment;

FIG. 6 is a diagram of an example of a connected component according tothe embodiment;

FIG. 7 is a diagram of an example of a connected component according tothe embodiment;

FIG. 8 is a diagram of an example of a connected component according tothe embodiment;

FIG. 9 is a diagram of an example of a connected component according tothe embodiment;

FIG. 10 is a flowchart of an example of processing in theimage-processing apparatus according to the embodiment;

FIG. 11 is a diagram of an example of an input image according to theembodiment;

FIG. 12 is a diagram of an example of a character-like region accordingto the embodiment;

FIG. 13 is a diagram of an example of a corrected region according tothe embodiment;

FIG. 14 is a graph of an example of threshold setting based on acumulative frequency distribution of area according to the embodiment;

FIG. 15 is a diagram of an example of an input image according to theembodiment;

FIG. 16 is a diagram of an example of a binary image according to theembodiment;

FIG. 17 is a diagram of an example of an input image according to theembodiment;

FIG. 18 is a diagram of an example of a binarized image according to theembodiment;

FIG. 19 is a diagram of an example of an input image according to theembodiment;

FIG. 20 is a diagram of an example of a binary image according to theembodiment;

FIG. 21 is a diagram of an example of an input image according to theembodiment; and

FIG. 22 is a diagram of an example of a binary image according to theembodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

An image-processing apparatus, an image-processing method, and acomputer program product according to the present disclosure will bedescribed in detail below with reference to drawings. Note that thepresent disclosure is not limited to this embodiment.

Configuration of the Embodiment

An example of the configuration of an image-processing apparatus 100according to an embodiment of the present disclosure will be describedbelow with reference to FIG. 1, and then, processing etc. according tothe embodiment will be described in detail. FIG. 1 is a block diagram ofthe example of a configuration of an image-processing apparatus 100according to an embodiment.

In the embodiment described below, the image-processing apparatus 100will be described as an example in order to specify the technical ideaof the present disclosure. It is not intended to limit the presentdisclosure to the image-processing apparatus 100, and the presentdisclosure is applicable equally to image-processing apparatuses 100 ofother embodiments included in the scope of the claims.

Function distribution of the image-processing apparatus 100 described asan example in the embodiment is not limited to the configurationdescribed later. The image-processing apparatus 100 can be configured insuch a manner that any units are functionally or physically separated orintegrated, as long as similar advantageous effects and functions can beexhibited.

The image-processing apparatus 100 includes, as schematicallyillustrated in FIG. 1, a control unit 102 and a storage unit 106. Thesesections of the image-processing apparatus 100 are connectedcommunicatively to each other via an optional communication path.

The image-processing apparatus 100 may further include an input/outputunit. The input/output unit performs input/output (I/O) of data.

The input/output unit may be any one, some or all of a key input unit, atouch panel, a control pad (a touch pad, a game pad or the like), amouse, a keyboard, and a microphone, for example.

The input/output unit may be any one or both of a display unit (adisplay, a monitor, a touch panel made of crystal liquid or organic ELor the like) configured to display information such as an application,and a sound output unit (a speaker or the like) configured to outputsound information as sound.

The image-processing apparatus 100 may further include an interfaceunit. The image-processing apparatus 100 may be connectedintercommunicatively to an external apparatus (for example,image-reading apparatus or the like) via the interface unit.

The interface unit may be any one or both of an antenna to be connectedto any one or both of a communication line and a telephone line, and aninterface (NIC or the like) to be connected to a communication apparatussuch as a router. Moreover, it may be a communication interface thatperforms a communication control between the image-processing apparatus100 and a network.

The network may include remote communications or the like such as anyone or both of wire communications and wireless communications (WiFi orthe like). The interface unit may be an input/output interface thatperforms input/output control between the image-reading apparatus or thelike and the control unit 102.

The control unit 102 may control the interface unit and the input/outputunit.

The storage unit 106 stores any one, some, or all of various kinds ofdatabase, tables, and files. Moreover, the storage unit 106 may storevarious kinds of application programs (for example, user applicationsand the like).

The storage unit 106 is a storage unit that may be any one, some, or allof a memory such as a random access memory (RAM) or a read-only memory(ROM), a fixed disc device such as a hard disc, a solid state drive(SSD), a flexible disc, and an optical disc, for example.

The storage unit 106 may store computer programs and the like for givinginstructions to a controller and to perform various processes.

An image data file 106 a out of these constituent elements of thestorage unit 106 stores image data. The image data may be color imagedata, grayscale image data, binary image data, input image data or thelike.

The control unit 102 may be constituted of tangible controllers thatcontrols generally the image-processing apparatus 100, including anyone, some, or all of a central processing unit (CPU), many core CPU, agraphics processing unit (GPU), a digital signal processor (DSP), alarge scale integration (LSI), an application specific integratedcircuit (ASIC), a field-programming gate array (FPGA) and the like orcontrol circuitry.

The control unit 102 has an internal memory for storing a controlprogram, a program that regulates various procedures or the like, andrequired data, and it performs information processing for executingvarious processes based on these programs.

The control unit 102 includes a hierarchical structure generating unit102 a, a region extracting unit 102 b, a correcting unit 102 c, an imageacquiring unit 102 d and an image displaying unit 102 e as principalconstituent elements.

The hierarchical structure generating unit 102 a identifies for eachgradation value a connected component of pixels of not less than or notmore than the gradation value neighboring and connected to each other inan input image, and generates hierarchical structure data of ahierarchical structure including the connected component.

The hierarchical structure generating unit 102 a may identify for eachgradation value a connected component of pixels of not less than or notmore than the gradation value neighboring and connected to each other inthe input image, and generate hierarchical structure data of ahierarchical structure of the connected component of the whole gradationvalues.

The whole gradation values may be all of the gradation values in 32, 64,128, 256 gradations or the like.

Further, the hierarchical structure generating unit 102 a may identifyfor each gradation value a connected component of pixels of not lessthan or not more than the gradation value neighboring and connected toeach other in the input image, and generate hierarchical structure dataof a hierarchical structure based on a gradation width.

Regarding 256 gradations for example, the hierarchical structure basedon a gradation width may be a 256-hierarchical structure or the like ofevery gradation.

The region extracting unit 102 b determines based on the hierarchicalstructure data whether the connected component satisfies a feature ofcharacter likelihood, and extracts the connected component satisfyingthe feature of character likelihood as a character-like region.

The region extracting unit 102 b may determine based on the hierarchicalstructure data whether the connected component satisfies acharacter-like sharpness, and extract the connected component satisfyingthe character-like sharpness as a character-like region.

The region extracting unit 102 b may determine based on the hierarchicalstructure data whether the connected component satisfies acharacter-like contrast, and extract the connected component satisfyingthe character-like contrast as a character-like region.

The region extracting unit 102 b may determine based on the hierarchicalstructure data whether the connected component satisfies acharacter-like area, and extract the connected component satisfying thecharacter-like area as a character-like region.

The region extracting unit 102 b may determine based on the hierarchicalstructure data whether a quotient of a dividend and a divisor satisfiesa threshold of character-like sharpness. In that case, the dividend is adifference between an area of a connected component and an area of aneighboring connected component on the hierarchical structure, and thedivisor is the area of the neighboring connected component. When thequotient is determined as satisfying the threshold of character-likesharpness, the region extracting unit 102 b may extract the connectedcomponent as a character-like region.

The region extracting unit 102 b may determine based on the hierarchicalstructure data whether a difference between a maximum gradation valueand a minimum gradation value of pixels included in the connectedcomponent satisfies a threshold of character-like contrast, and when thedifference is determined as satisfying the threshold of character-likecontrast, the region extracting unit 102 b may extract the connectedcomponent as a character-like region.

Further, the region extracting unit 102 b determines based on thehierarchical structure data whether the area of the connected componentsatisfies a threshold of character-like area, and when the area of theconnected component is determined as satisfying the threshold ofcharacter-like area, the region extracting unit 102 b may extract theconnected component as a character-like region.

The correcting unit 102 c acquires based on the maximum gradation valueand the minimum gradation value of the pixels included in thecharacter-like region a threshold of binarization used exclusively forthe character-like region, and acquires based on the threshold ofbinarization a corrected region where the character-like region isbinarized.

The correcting unit 102 c may acquire a threshold of binarization usedexclusively for the character-like region, and acquire based on thethreshold of binarization a corrected region where the character-likeregion is binarized. Here, the threshold is a value obtained bymultiplying a difference between the maximum gradation value and theminimum gradation value of pixels included in the character-like regionby a predetermined parameter.

Further, the correcting unit 102 c may generate a cumulative frequencydistribution of an area from a pixel having the minimum gradation valueto a pixel having the maximum gradation value included in thecharacter-like region, then acquire a gradation value where a relativecumulative value occupies a predetermined ratio in the cumulativefrequency distribution as the threshold of binarization used exclusivelyfor the character-like region, and acquire based on the threshold ofbinarization the corrected region where the character-like region isbinarized.

The image acquiring unit 102 d acquires image data. The image acquiringunit 102 d may acquire binary image data of the binary image.

Further, the image acquiring unit 102 d may acquire a background regionwhere a gradation value of a pixel included in a region of the inputimage other than the corrected region is changed to a gradation valuefor a background, and acquire a binary image data of a binary imagecomposed of the corrected region and the background region.

Further, the image acquiring unit 102 d may acquire input image data ofan input image. The input image may be a color image, or a multivaluedimage such as a grayscale image. The image acquiring unit 102 d maystore the image data in the image data file 106 a.

The image displaying unit 102 e displays image data. The imagedisplaying unit 102 e may display the image data via the input/outputunit.

Processing of the Embodiment

An example of processing executed in the image-processing apparatus 100having the above-described configuration will be explained withreference to FIG. 2 to FIG. 22. FIG. 2 is a flowchart of an example ofprocessing in the image-processing apparatus 100 of the embodiment.

As shown in FIG. 2, first the image acquiring unit 102 d acquires inputimage data of an input image as a multivalued image stored in the imagedata file 106 a (Step SA-1).

The following explains an example of an input image according to theembodiment with reference to FIG. 3. FIG. 3 is a diagram of an exampleof an input image according to the embodiment.

As shown in FIG. 3, in the embodiment, for example, the input image maybe a multivalued image composed of pixels of four gradation values of an11×11 pixel size.

Returning to FIG. 2, the hierarchical structure generating unit 102 aidentifies for each gradation value a connected component of pixels ofnot more than the gradation value neighboring and connected to eachother in the input image, and generates hierarchical structure data of ahierarchical structure based on the gradation width, which is composedof the connected component of the whole gradation values (Step SA-2).

The following explains an example of a connected component according toan embodiment with reference to FIGS. 4 to 9. FIG. 4 is a diagram of anexample of a hierarchical structure of a connected component in theembodiment. FIGS. 5 to 9 are diagrams of an example of a connectedcomponent in the embodiment.

As shown in FIG. 4, in the embodiment, hierarchical structure data of ahierarchical structure (Connected Component Tree) using links and nodesmay be generated from the connected components in an input imagecomposed of pixels of four gradation values (Levels 1-4) in 256gradations shown in FIG. 3.

In FIG. 4, 256 round points aligned longitudinally from 0 to 255indicate respectively the gradation values.

In FIG. 4, a connected component C, a connected component E and aconnected component F, which are not in a neighboring connectionrelation, are in a relation equivalent to each other in the maximumgradation value in the 256 gradations.

Further as shown in FIG. 4, in the embodiment, it is possible togenerate hierarchical structure data for connected components differentfrom each other in the maximum gradation values for expressing aninclusion relation corresponding to an sequence of the gradation values,namely, a relation that a connected component having a high maximumgradation value includes a connected component having a low maximumgradation value when the connected components are neighboring and in aconnected relation.

Namely, in the embodiment, a connected component corresponding to aparent node in the hierarchical structure is in a relation including aconnected component of any one or both of a child node and a grandchildnode.

For example, as shown in FIG. 4, in the embodiment, the connectedcomponent B is in a relation including a connected component C and aconnected component E as child nodes and a connected component D as agrandchild node.

Further as shown in FIG. 4, in the embodiment, hierarchical structuredata having a hierarchical structure of 256 gradations of the same pitchwidth as the gradation width of the 256-gradation input image may begenerated.

In this manner, in the embodiment, a hierarchical structure with finepitch width of 256 gradations and the like allows accurate separation ofthe connected components.

Further as shown in FIG. 5, in the embodiment, a region where pixels ofnot higher than Level 3 are neighboring and connected to each other maybe identified as a connected component B on a level lower than theconnected component A (white background image of 11×11 pixels: 255gradation values).

Further as shown in FIG. 6, in the embodiment, a region where pixels ofnot higher than Level 2 are neighboring and connected to each other maybe identified as a connected component C on a level lower than theconnected component A and on a level lower than the connected componentB.

Further as shown in FIG. 7, in the embodiment, a region where pixels ofnot higher than Level 2 are neighboring and connected to each other maybe identified as a connected component E on a level lower than theconnected component A and on a level lower than the connected componentB.

Further as shown in FIG. 8, in the embodiment, a region where pixels ofnot higher than Level 2 neighboring and connected to each other may beidentified as a connected component F on a level lower than theconnected component A. In the embodiment, the connected component F is anoise in the image.

Further as shown in FIG. 9, in the embodiment, a region where pixels ofnot higher than Level 1 are neighboring and connected to each other maybe identified as a connected component D (0 gradation value) on a levellower than the connected component A, on a level lower than theconnected component B, and on a level lower than the connected componentC.

Returning to FIG. 2, the region extracting unit 102 b determines basedon the hierarchical structure data whether the connected component ofeach gradation value satisfies the feature of character likelihood, andextracts the connected component satisfying the feature of characterlikelihood as a character-like region (Step SA-3).

The following explains an example of processing of extracting acharacter-like region according to the embodiment with reference to FIG.10. FIG. 10 is a flow chart showing an example of processing in theimage-processing apparatus 100 of the embodiment.

As shown in FIG. 10, first the region extracting unit 102 b determinesbased on the hierarchical structure data whether a quotient of adividend and a divisor satisfies the threshold of character-likesharpness. Here, the dividend is a difference between an area of aconnected component of each gradation value and an area of a neighboringconnected component on the hierarchical structure, and the divisor isthe area of the neighboring connected component. When the quotient isdetermined as satisfying the threshold of character-like sharpness, theprocessing is shifted to Step SB-2 (Step SB-1).

The character-like sharpness in the embodiment may be determined byusing an index expressed by Formula 1 below.(Area_(Γ) _(λ+Δ) −Area_(Γ) _(λ) )/Area_(Γ) _(λ)   (Formula 1)(Area_(Γλ) is an area of a region (Γ_(λ)) corresponding to a pixel valueλ on a hierarchical structure, and Δ is a change amount in pixel valueon hierarchical structure)

In the hierarchical structure of FIG. 4 for example, when λ=Level 3, theregion corresponding to the pixel value λ in Formula 1 may be theconnected component B.

In the embodiment, the sharpness may be determined by setting athreshold with respect to Formula 1 for each node (connected component)on the hierarchical structure, thereby extracting a region of not morethan the threshold as a node to satisfy the sharpness.

Further in the embodiment, only the node corresponding to the highestlevel may be extracted among the extracted nodes in a joint relation onthe hierarchical structure.

Specifically in the embodiment, sharpness determination may be performedby setting a threshold to 0.4 by use of Formula 1 as follows anddetermining whether a value is smaller than the threshold.(Area_(Γ) _(λ+Λ) −Area_(Γ) _(λ) )/Area_(Γ) _(λ) <0.4

The region extracting unit 102 b determines based on the hierarchicalstructure data whether the difference between the maximum gradationvalue and the minimum gradation value of the pixels included in theconnected component satisfying the threshold of character-like sharpnesssatisfies the threshold of character-like contrast, and when thedifference is determined as satisfying the threshold of character-likecontrast, the processing is shifted to Step SB-3 (Step SB-2).

The determination of character-like contrast in the embodiment may beperformed by using as an index a difference between a maximal pixelvalue and a minimal pixel value of each extracted connected component asexpressed by Formula 2 below.λ_(Γ) _(λ) ^(max)−λ_(Γ) _(λ) ^(min)  (Formula 2)(λ_(Γ) _(λ) ^(max) is a maximal value of pixel value included in regionΓ_(λ), and λ_(Γ) _(λ) ^(min) is a minimal value of pixel value includedin region Γ_(λ))

Specifically in the embodiment, the contrast determination may beperformed by setting the threshold to 50 by use of Formula 2 below anddetermining whether the difference is larger than the threshold.50<λ_(Γ) _(λ) ^(max)−λ_(Γ) _(λ) ^(min)

The region extracting unit 102 b determines based on the hierarchicalstructure data whether the area of the connected component that has beendetermined as satisfying the character-like contrast satisfies thethreshold of character-like area, and when the area of the connectedcomponent is determined as satisfying the threshold of character-likearea, the region extracting unit 102 b extracts the connected componentas a character-like region (Step SB-3), and the processing is ended.

Here, in the determination on the character-like area in the embodiment,the area of the extracted connected component may be used as an index asexpressed by Formula 3 below.Area_(Γ) _(λ)   (Formula 3)

Specifically in the embodiment, an area determination may be performedby setting the minimal threshold to 5 and the maximal threshold to 20000and determining by use of Formula 3 whether the area is between thethresholds.5<=Area_(Γ) _(λ) and Area_(Γ) _(λ) <20000

In typical image data, a character-like region possesses featuresrelating to a character-like sharpness, a character-like contrast(difference between the maximal value and the minimal value of gradationvalues of pixels in the region), and, the area of the character-likeregion. In light of this, in the embodiment, these features are employedas standards for extraction of the character-like region.

Returning to FIG. 2, the correcting unit 102 c acquires based on themaximum gradation value and the minimum gradation value of pixelsincluded in the character-like region the threshold of binarization usedexclusively for the character-like region, and acquires based thethreshold of binarization a corrected region where the character-likeregion is binarized (Step SA-4).

The following explains an example of a character recognizabilitycorrection according to the embodiment with reference to FIGS. 11 to 14.FIG. 11 is a diagram of an example of an input image according to theembodiment. FIG. 12 is a diagram of an example of a character-likeregion according to the embodiment. FIG. 13 is a diagram of an exampleof a corrected region according to the embodiment. And FIG. 14 is agraph of an example of a threshold setting based on a cumulativefrequency distribution of area according to the embodiment.

In the embodiment, the extracted character-like region is corrected toimprove the character recognizability.

For example in the embodiment, when the input image is an image of akanji (Chinese character) in Mincho-font to be pronounced “ten” or“nori” as shown in FIG. 11, the character-like region is extracted as animage with inferior character recognizability as shown in FIG. 12.

Therefore in the embodiment, for performing correction with respect tothe character-like region with inferior character recognizability, athreshold of binarization may be calculated by use of Formula 4 belowbased on information limited to the inside of the character-like region.(λ_(Γ) _(λ) ^(max)−λ_(Γ) _(λ) ^(min))×ratio  (Formula 4)

And in the embodiment, binarization of the character-like region shownin FIG. 12 is carried out with the threshold calculated by use ofFormula 4 to acquire a corrected region as shown in FIG. 13, therebyimproving the character recognizability.

In the embodiment, when the ratio as shown in Formula 4 is 1.0, anuncorrected character-like region shown in FIG. 12 is acquired as acorrected region.

In the embodiment, when the ratio as shown in Formula 4 is 0.75, acorrected region shown in FIG. 13 is acquired.

Further in the embodiment, a threshold of binarization may be calculatedwithout depending on a parameter.

For example in the embodiment, the graph shown in FIG. 14 is created bycalculating a cumulative frequency distribution of the area from a pixelhaving the minimum gradation value to a pixel having the maximumgradation value within the character-like region shown in FIG. 12.

Regarding the fonts, the area of the character-like region can often beapproximately as twice as the area of the corrected region with a highcharacter recognizability. Therefore in the graph shown in FIG. 14, thethreshold of binarization is set to a gradation value at which therelative cumulative frequency is 50% (0.5).

By employing this threshold, in the embodiment, a corrected region withan improved character recognizability is acquired from thecharacter-like region shown in FIG. 12.

Returning to FIG. 2, the image acquiring unit 102 d acquires abackground region where the gradation value of pixels included in theregion of the input image other than the corrected region is changed toa gradation value for background, and acquires binary image data of abinary image composed of the corrected region and the background region(Step SA-5), and the processing is ended.

Further, the image displaying unit 102 e may display the binary imagedata acquired by the image acquiring unit 102 d via the input/outputunit and allow a user to check the data.

In this manner, in the embodiment, a binary image for distinguishing acorrected region and the remaining region is generated.

In the embodiment, when the corrected region is black (for example, in agray scale, a gradation value is 0), the remaining region is set to bewhite (for example, in a gray scale, a gradation value is 255) togenerate a binary image. When the corrected region is white, theremaining region is set to be black so as to generate a binary image.

The following explains an example of binary processing according to theembodiment with reference to FIGS. 15 to 22. FIG. 15, FIG. 17, FIG. 19and FIG. 21 are drawings each showing an example of an input image inthe embodiment. FIG. 16, FIG. 18, FIG. 20 and FIG. 22 are drawings eachshowing an example of a binary image in the embodiment.

When the binarization processing is applied to the image of FIG. 15where no image degradation factors are found, a highly-accurate binaryimage as shown in FIG. 16 can be obtained in the embodiment because ofabsence of image degradation factors.

When the binarization processing is applied to the image of FIG. 17taken with a mobile camera and having an image degradation factor of lowcontrast, similarly a highly-accurate binary image as shown in FIG. 18can be obtained in the embodiment.

Further, the binarization processing is applied to the image of FIG. 19taken with a mobile camera and having an image degradation factor ofluminance unevenness. In the embodiment, the binary image shown in FIG.20 has characters of high-accuracy similarly to an image where no imagedegradation factors are found.

Further, the binarization processing is applied to the image of FIG. 21taken with a mobile camera and having an image degradation factor ofblur. In the embodiment, a highly-accurate binary image can be obtainedas shown in FIG. 22 although the character region is slightly eroded.

In this manner, in the embodiment, even for an image with any imagedegradation factor, it is possible to extract robustly only thecharacter region and binarize the region without considerably modifyingthe character region.

When the OCR processing was performed with respect to the binary imagedata acquired in the disclosure as described in JP-A-2015-26290, the OCRaccuracy was 88% in average. When the OCR processing was performed withrespect to the binary image data acquired by the binarization processingaccording to the embodiment, the OCR accuracy was improved to 98% inaverage.

The tendency toward high resolution of mobile camera device has allowedOCR with respect to camera image data. For example, for personalauthentication, identification cards (such as a driver's license, anindividual number card called “My Number Card”, and a residence card)are scanned easily with a camera and subjected to OCR.

However, unlike a scanner image, a camera image has a problem that quitea few image degradation factors (luminance unevenness, noise, blur, lowcontrast or the like) caused by the environment in photographing asubject and caused by devices would be included in the image.

Due to these image degradation factors, a binary image by theconventional binarization can inevitably include partially-missingcharacters, noise and the like that may result in OCR false recognition,and thus a high OCR accuracy cannot be achieved.

Therefore in the embodiment, a character region as a foreground isextracted from a hierarchical data structure of connected componentsrepresenting an inclusion relation corresponding to a gradation valuesequence of pixels, and a binary image is generated from the extractedregion.

In other words, for each gradation value, pixels of not less than or notmore than the gradation value, which are neighboring and in a connectedrelation, are identified as a connected component.

And in the embodiment, data that represents a hierarchical structure(Connected Component Tree) of regions representing an inclusion relationcorresponding to the sequence of gradation values among connectedcomponents are generated.

Further in the embodiment, a character-like region is extracted from thegenerated data. Then, character recognizability in the extractedcharacter-like region is corrected, whereby a binary image todistinguish the corrected region and the remaining region is generated.

Though there have been techniques to extract a character-like regionfrom a hierarchical structure, the techniques are limited to extractionof a character-like region. There has not been any processing ofcorrecting a region to have a shape recognizable at a high accuracy inOCR.

In contrast, in the embodiment, a character-like region is extracted andthen the extracted character-like region is corrected to improve thecharacter recognizability.

Further in the embodiment, a region with improved characterrecognizability is acquired as a binary region, whereby the region canbe used for various purposes.

The image data that can be used for various purposes may be image datahaving a smaller data capacity in comparison with color image data,image data of a level that requires many OCR engines for reading or thelike.

Other Embodiments

The embodiment of the present disclosure has been explained so far.Besides the foregoing embodiment, the present disclosure can also becarried out in various different embodiments within the scope of thetechnical idea described in the claims.

For example, the image-processing apparatus 100 may perform processingin a standalone mode, or may perform processing according to a requestfrom a client terminal (separate from the image-processing apparatus100) and then return the results of the processing to the clientterminal.

Out of the processes explained in relation to the embodiment, all orsome of the processes explained as being automatically performed may bemanually performed, or all or some of the processes explained as beingmanually performed may be automatically performed by publicly knownmethods.

Besides, the process steps, the control steps, the specific names, theinformation including registered data for the processes or parameterssuch as search conditions, the screen examples, or the databaseconfigurations described or illustrated herein or the drawings can beappropriately changed if not otherwise specified.

The constituent elements of the image-processing apparatus 100 shown inthe drawings are conceptual functions and do not necessarily need to bephysically configured as shown in the drawings.

For example, all or any part of the processing functions included in theunits of the image-processing apparatus 100, in particular, theprocessing functions performed by the control unit 102 may beimplemented by the CPU or programs interpreted and executed by the CPU,or may be implemented by wired logic-based hardware.

The programs including programmed instructions for causing a computer toexecute methods according to the present disclosure described later arerecorded in non-transitory computer-readable recording media, and aremechanically read by the image-processing apparatus 100 as necessary.Specifically, the computer programs for giving instructions to the CPUto perform various processes in cooperation with an operating system(OS) are recorded in the storage unit 106 such as a ROM or an HDD. Thecomputer programs are loaded into the RAM and executed, and constitute acontrol unit in cooperation with the CPU.

The computer programs may be stored in an application program serverconnected to the image-processing apparatus 100 via an appropriatenetwork, and may be entirely or partly downloaded as necessary.

The programs according to the present disclosure may be stored incomputer-readable recording media or may be formed as program products.The “recording media” include any portable physical media such as amemory card, a USB memory, an SD card, a flexible disc, a magnetooptical disc (MO), a ROM, an erasable programmable read only memory(EPROM), an electrically erasable programmable read only memory(EEPROM), a compact disc read only memory (CD-ROM), a DVD, and a Blu-ray(registered trademark) disc.

The “programs” constitute data processing methods described in anappropriate language or by an appropriate describing method, and are notlimited in format such as source code or binary code. The “programs” arenot limited to singly-configured ones but may be distributed into aplurality of modules or libraries or may perform their functions inconjunction with another program typified by an OS. Specificconfigurations for reading the recording media by the units according tothe embodiment, specific procedures for reading the programs, orspecific procedures for installing the read programs may be well-knownconfigurations or procedures.

The various databases and others stored in the storage unit 106 may bestorage units such as any one, some, or all of a memory device such as aRAM or a ROM, a fixed disc device such as a hard disc, a flexible disc,and an optical disc, and may store any one, some, or all of variousprograms, tables, databases, and web page files for use in variousprocesses and web site provision.

The image-processing apparatus 100 may be an information processingapparatus such as a well-known personal computer, and an appropriateperipherals may be connected to the information processing apparatus.The image-processing apparatus 100 may be embodied by providing theinformation processing apparatus with software (including programs,data, and the like) for implementing the methods according to thepresent disclosure.

Further, the specific modes of distribution and integration of thedevices are not limited to the ones illustrated in the drawings but allor some of the devices may be functionally or physically distributed orintegrated by a predetermined unit according to various additions andthe like or functional loads. That is, the foregoing embodiments may becarried out in any appropriate combination or may be selectively carriedout.

According to the present disclosure, a highly accurate binary image of acharacter region as a foreground can be acquired without performing OCRprocessing, based on the hierarchical structure of connected componentsrepresenting an inclusion relation corresponding to the gradation valuesequence of pixels.

According to the present disclosure, a binary image having a highcharacter recognizability can be generated without depending onphotographing environment or photographing equipment by performing abinarization method based on character region extraction.

Further, the present disclosure can provide a high OCR accuracy byimproving the character recognizability.

Although the disclosure has been described on specific embodiments for acomplete and clear disclosure, the appended claims are not to be thuslimited but are to be construed as embodying all modifications andalternative constructions that may occur to one skilled in the art thatfairly fall within the basic teaching herein set forth.

What is claimed is:
 1. An image-processing apparatus comprising: amemory; and a processor coupled to the memory, wherein the processorexecutes a process comprising: identifying for each gradation value in aset of gradation values a connected component of pixels of not less thanor not more than the gradation value neighboring and connected to eachother in an input image; generating hierarchical structure data of ahierarchical structure including identified connected component;determining based on the hierarchical structure data whether theidentified connected component satisfies a feature of characterlikelihood; extracting the identified connected component satisfying thefeature of character likelihood as a character-like region; acquiringbased on a maximum gradation value and a minimum gradation value ofpixels included in the character-like region a threshold of binarizationused exclusively for the character-like region; acquiring based on thethreshold of binarization a corrected region where the character-likeregion is binarized; acquiring a background region where a gradationvalue of a pixel included in a region of the input image other than thecorrected region is changed to a gradation value for a background; andacquiring binary image data of a binary image composed of the correctedregion and the background region.
 2. The image-processing apparatusaccording to claim 1, wherein the generating includes generating thehierarchical structure data of the hierarchical structure including theidentified connected component of all of the gradation values.
 3. Theimage-processing apparatus according to claim 1, wherein the generatingincludes generating the hierarchical structure data of the hierarchicalstructure based on a gradation width.
 4. The image-processing apparatusaccording to claim 1, wherein the extracting includes determining basedon the hierarchical structure data whether the identified connectedcomponent satisfies a character-like sharpness, and extracting theidentified connected component satisfying the character-like sharpnessas the character-like region.
 5. The image-processing apparatusaccording to claim 1, wherein the extracting includes determining basedon the hierarchical structure data whether the identified connectedcomponent satisfies a character-like contrast, and extracting theidentified connected component satisfying the character-like contrast asthe character-like region.
 6. The image-processing apparatus accordingto claim 1, wherein the extracting includes determining based on thehierarchical structure data whether the identified connected componentsatisfies a character-like area, and extracting the identified connectedcomponent satisfying the character-like area as the character-likeregion.
 7. The image-processing apparatus according to claim 1, whereinthe acquiring the threshold includes acquiring a threshold ofbinarization used exclusively for the character-like region, thethreshold being a value obtained by multiplying a difference between themaximum gradation value and the minimum gradation value of the pixelsincluded in the character-like region by a predetermined parameter, andthe acquiring the corrected region includes acquiring based on thethreshold of binarization a corrected region where the character-likeregion is binarized.
 8. The image-processing apparatus according toclaim 1, wherein the acquiring the threshold includes generating acumulative frequency distribution of an area from a pixel having theminimum gradation value to a pixel having the maximum gradation valueincluded in the character-like region, acquiring a gradation value wherea relative cumulative value occupies a predetermined ratio in thecumulative frequency distribution as the threshold of binarization usedexclusively for the character-like region, and acquiring based on thethreshold of binarization the corrected region where the character-likeregion is binarized.
 9. The image-processing apparatus according toclaim 4, wherein when a dividend is a difference between an area of theidentified connected component and an area of a neighboring connectedcomponent on the hierarchical structure and a divisor is an area of theneighboring connected component, the determining includes determiningbased on the hierarchical structure data whether a quotient of thedividend and the divisor satisfies a threshold of character-likesharpness, and the extracting includes extracting the identifiedconnected component as the character-like region when the quotient isdetermined as satisfying the threshold of character-like sharpness. 10.The image-processing apparatus according to claim 5, wherein thedetermining includes determining based on the hierarchical structuredata whether a difference between the maximum gradation value and theminimum gradation value of the pixels included in the identifiedconnected component satisfies a threshold of character-like contrast,and the extracting includes extracting the identified connectedcomponent as the character-like region when the difference is determinedas satisfying the threshold of character-like contrast.
 11. Theimage-processing apparatus according to claim 6, wherein the determiningincludes determining based on the hierarchical structure data whetherthe area of the identified connected component satisfies a threshold ofcharacter-like area, and the extracting includes extracting theidentified connected component as the character-like region when thearea of the identified connected component is determined as satisfyingthe threshold of character-like area.
 12. An image-processing methodcomprising: identifying for each gradation value in a set of gradationvalues a connected component of pixels of not less than or not more thanthe gradation value neighboring and connected to each other in an inputimage; generating hierarchical structure data of a hierarchicalstructure including the identified connected component; determiningbased on the hierarchical structure data whether the identifiedconnected component satisfies a feature of character likelihood;extracting the identified connected component satisfying the feature ofcharacter likelihood as a character-like region; acquiring based on amaximum gradation value and a minimum gradation value of pixels includedin the character-like region a threshold of binarization usedexclusively for the character-like region; acquiring based on thethreshold of binarization a corrected region where the character-likeregion is binarized; acquiring a background region where a gradationvalue of a pixel included in a region of the input image other than thecorrected region is changed to a gradation value for a background; andacquiring binary image data of a binary image composed of the correctedregion and the background region.
 13. A computer program product havinga non-transitory tangible computer readable medium including programmedinstructions for causing, when executed by a computer, the computer toperform an image-processing method comprising: identifying for eachgradation value in a set of gradation values a connected component ofpixels of not less than or not more than the gradation value neighboringand connected to each other in an input image; generating hierarchicalstructure data of a hierarchical structure including the identifiedconnected component; determining based on the hierarchical structuredata whether the identified connected component satisfies a feature ofcharacter likelihood; extracting the identified connected componentsatisfying the feature of character likelihood as a character-likeregion; acquiring based on a maximum gradation value and a minimumgradation value of pixels included in the character-like region athreshold of binarization used exclusively for the character-likeregion; acquiring based on the threshold of binarization a correctedregion where the character-like region is binarized; acquiring abackground region where a gradation value of a pixel included in aregion of the input image other than the corrected region is changed toa gradation value for a background; and acquiring binary image data of abinary image composed of the corrected region and the background region.